package vista;
import java.awt.BorderLayout;
import javax.swing.JButton;

import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

import controlador.ContActualizarIngredientes;
import controlador.ContActualizarProductos;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class DlgActualizarProductos extends javax.swing.JDialog {
	private JPanel pnlProductos;
	private JScrollPane jScrollPane1;
	private JButton btSalir;
	private JButton btModificar;
	private JButton btAnadir;
	private JTable tblProductos;

	/**
	* Auto-generated main method to display this JDialog
	*/
	private ContActualizarProductos controlador;

	public DlgActualizarProductos(JFrame frame, ContActualizarProductos controlador) {
		super(frame);
		this.controlador = controlador;
		initGUI();
	}
	
	
	private void initGUI() {
		try {
			{
				this.setTitle("Productos");
			}
			{
				pnlProductos = new JPanel();
				getContentPane().add(pnlProductos, BorderLayout.CENTER);
				pnlProductos.setPreferredSize(new java.awt.Dimension(373,278));
				pnlProductos.setLayout(null);
				//pnlProductos.setLayout(pnlProductosLayout);
				{
					jScrollPane1 = new JScrollPane();
					pnlProductos.add(jScrollPane1);
					jScrollPane1.setBounds(16, 25, 357, 150);
					{
						tblProductos = new JTable();
						jScrollPane1.setViewportView(tblProductos);
						tblProductos.setBounds(90, 74, 193, 63);
					}
				}
				{
					btAnadir = new JButton();
					pnlProductos.add(btAnadir);
					btAnadir.setText("Agregar");
					btAnadir.setBounds(28, 214, 105, 26);
				}
				{
					btModificar = new JButton();
					pnlProductos.add(btModificar);
					btModificar.setText("Modificar");
					btModificar.setBounds(148, 214, 112, 26);
				}
				{
					btSalir = new JButton();
					pnlProductos.add(btSalir);
					btSalir.setText("Salir");
					btSalir.setBounds(281, 214, 73, 26);
				}
			}
			setSize(400, 300);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
   
	public JTable getTblProductos() {
		return tblProductos;
	}

	public JButton getBtModificar() {
		return btModificar;
	}

	public JButton getBtSalir() {
		return btSalir;
	}

	public JButton getBtAnadir() {
		return btAnadir;
	}

	public void mostrarMensaje(String mensaje) {
		JOptionPane.showMessageDialog(this, mensaje);
	}
}

